﻿<style>
form#isuueContractForm {float:left}
form#isuueContractForm span.left,
form#isuueContractForm label{
	width:90px;
	text-align:right;
	display:block;
	float:left;
	padding-top:8px;
}
form#isuueContractForm{width:250px;}
form#isuueContractForm input#submit{
	float:right;
}
form#isuueContractForm  h1{
	margin-bottom:10px;
	text-align:center;
}
form#isuueContractForm #datum{
	float:left;
	margin-left:5px;
	padding-top:8px;
	display:block;
	-moz-opacity:0.4;
}
</style>
<form class="area" method="post" action="javascript:void(0)" onSubmit="issueContract(this)" id="isuueContractForm">
	<h1>Izdavanje ugovora</h1>
	<span class="left">Datum:</span><span id="datum">{{$datum}}</span><br clear="all" />
	<label for="broj_ugovora">Br.Ugovora: </label>
	<input style="width:45px;" name="broj_ugovora" type="text" id="broj_ugovora" maxlength="8" onchange="this.value = formatUgovorBroj(this.value)" rule="^\d{5}(/\d{2})*$" />
	<span style="float:left; margin-top:8px;">-</span>
	<input style="width:45px;" name="broj_ugovora_end" type="text" id="broj_ugovora_end" onchange="this.value = this.value.length>0?formatUgovorBroj(this.value):''" maxlength="8" rule="^\d{5}(/\d{2})*$" />
	<br clear="all" />
	<label for="kol_pracuna">Kol.Predračuna: </label><input style="width:20px;" name="kol_pracuna" type="text" id="kol_pracuna" maxlength="2" rule="^\d{0,2}$" />
	<br clear="all" />
	<label for="radnik">Radnik:</label>
	<select name="radnik" id="radnik">
		{{%loop start radnik_id}}
		<option value="{{$radnik_id}}">{{$radnik_ime}}&nbsp;{{$radnik_prezime}}</option>
		{{%loop end}}
	</select><br clear="all" />
	<label for="komentar">Komentar:</label>
	<textarea name="komentar" id="komentar"></textarea>
	<input type="submit" id="submit" value="Izdaj ugovor" />
</form>
<script>
setInputRules();
</script>